﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:CodeWriterHelper.ViewModel"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" mc:Ignorable="d" x:Class="CodeWriterHelper.MainWindow"
        Title="CodeWriter Helper" >
    <Window.Resources>
    	<vm:MainWindowViewModel x:Key="ViewModel" />
    	<DataTemplate x:Key="TabsTemplate"/>
    	<DataTemplate x:Key="TabItemContentTemplate">
    		<Grid x:Name="MainGrid" Height="0" Width="0" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment, Width, Height, Margin">
    			<Grid.RowDefinitions>
    				<RowDefinition Height="30" />
    				<RowDefinition Height="30" />
    				<RowDefinition Height="29" />
    				<RowDefinition Height="30" />
                
    				<RowDefinition Height="*" MinHeight="250" />
    			</Grid.RowDefinitions>
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="120" />
    				<ColumnDefinition Width="*"  MinWidth="150"/>
    				<ColumnDefinition Width="120" />
    				<ColumnDefinition Width="*" MinWidth="150" />
    			</Grid.ColumnDefinitions>
    			<Label Content="Prefix" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label1" VerticalAlignment="Center" FontWeight="Bold" Grid.Row="1" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,3.5" x:Name="prefixTextBox" VerticalAlignment="Bottom" Text="{Binding FirstOptions.LinePrefix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1" />
    			<Label Content="Suffix" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label2" VerticalAlignment="Center" Grid.Row="2" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,0" x:Name="suffixTextBox" VerticalAlignment="Center" Text="{Binding FirstOptions.LineSuffix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="2" />
    			<Label Content="Add Tab" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label3" VerticalAlignment="Center" Grid.Column="2" FontWeight="Bold" />
    			<Label Content="Remove Tab" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label4" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0" x:Name="addTabTextBox" VerticalAlignment="Center" Text="{Binding FirstOptions.AddTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="3" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0" x:Name="removeTabTextBox" VerticalAlignment="Center" Text="{Binding FirstOptions.RemoveTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="3" Grid.Row="1" />
    			<Label Content="Original Code" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label5" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3" FontWeight="Bold" />
    			<Label Content="Transformer Code" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label6" VerticalAlignment="Center" Grid.Column="2" Grid.Row="3" FontWeight="Bold" />
    			<TextBox Grid.ColumnSpan="2" Grid.Row="4" HorizontalAlignment="Stretch" x:Name="originalCodeTextBox" VerticalAlignment="Stretch" Margin="8,0,4,8" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" AcceptsReturn="True" AcceptsTab="True" TextWrapping="NoWrap" Text="{Binding FirstOptions.OriginalText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
    			<TextBox Grid.ColumnSpan="2" HorizontalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" Margin="4,0,8,8" x:Name="transformerCodeTextBox" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" Grid.Column="2" Grid.Row="4" IsReadOnlyCaretVisible="True" IsReadOnly="True" Text="{Binding FirstOptions.ResultText, Mode=OneWay}" />
    			<Label Content="Empty Row" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label7" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,4,4,2" x:Name="emptyRowTextBox" Text="{Binding FirstOptions.EmptyRow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Grid.Column="3" Grid.Row="2" />
    			<Label Content="Config Name" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label1_Copy" VerticalAlignment="Center" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,3.5" x:Name="prefixTextBox_Copy" VerticalAlignment="Bottom" Text="{Binding FirstOptions.Name}" Grid.Column="1" />
    			<Grid Background="#FFE5E5E5" Grid.Column="3" HorizontalAlignment="Left" Grid.Row="4" VerticalAlignment="Top"/>
    			<Grid HorizontalAlignment="Left" Margin="0,0,0,10" d:LayoutOverrides="Height"/>
    		</Grid>
    	</DataTemplate>
    	<DataTemplate x:Key="TabControlTemplate">
    		<Grid>
    			<TabItem Header="{Binding Name}" d:LayoutOverrides="Width, Height"/>
    		</Grid>
    	</DataTemplate>
    	<Style x:Key="TabItemFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle Margin="3,3,3,1" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
    	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    		<GradientStop Color="#F3F3F3" Offset="0"/>
    		<GradientStop Color="#EBEBEB" Offset="0.5"/>
    		<GradientStop Color="#DDDDDD" Offset="0.5"/>
    		<GradientStop Color="#CDCDCD" Offset="1"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0">
    		<GradientStop Color="#EAF6FD" Offset="0.15"/>
    		<GradientStop Color="#D9F0FC" Offset=".5"/>
    		<GradientStop Color="#BEE6FD" Offset=".5"/>
    		<GradientStop Color="#A7D9F5" Offset="1"/>
    	</LinearGradientBrush>
    	<SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/>
    	<SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/>
    	<SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/>
    	<SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
    	<Style x:Key="TabItemStyle1" TargetType="{x:Type TabItem}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
    		<Setter Property="Foreground" Value="Black"/>
    		<Setter Property="Padding" Value="6,1,6,1"/>
    		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TabItem}">
    					<Grid SnapsToDevicePixels="true">
    						<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
    							<ContentPresenter x:Name="Content" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
    						</Border>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="true">
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemHotBackground}"/>
    						</Trigger>
    						<Trigger Property="IsSelected" Value="true">
    							<Setter Property="Panel.ZIndex" Value="1"/>
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemSelectedBackground}"/>
    						</Trigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="false"/>
    								<Condition Property="IsMouseOver" Value="true"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemHotBorderBrush}"/>
    						</MultiTrigger>
    						<Trigger Property="TabStripPlacement" Value="Bottom">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Left">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Right">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
    						</Trigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Top"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-2,-2,-1"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,0,0,1"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Bottom"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-1,-2,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,1,0,0"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Left"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-2,-1,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,0,1,0"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Right"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-1,-2,-2,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="1,0,0,0"/>
    						</MultiTrigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
    							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<DataTemplate x:Key="DataTemplate1">
    		<Grid/>
    	</DataTemplate>
    	<DataTemplate x:Key="DataTemplate2">
    		<Grid x:Name="MainGrid" Height="Auto" Background="White" Margin="0">
    			<Grid.RowDefinitions>
    				<RowDefinition Height="30" />
    				<RowDefinition Height="30" />
    				<RowDefinition Height="29" />
    				<RowDefinition Height="30" />
                
    				<RowDefinition Height="*" MinHeight="250" />
    			</Grid.RowDefinitions>
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="120" />
    				<ColumnDefinition Width="*"  MinWidth="150"/>
    				<ColumnDefinition Width="120" />
    				<ColumnDefinition Width="*" MinWidth="150" />
    			</Grid.ColumnDefinitions>
    			<Label Content="Prefix" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label1" VerticalAlignment="Center" FontWeight="Bold" Grid.Row="1" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,3.5" x:Name="prefixTextBox" VerticalAlignment="Bottom" Text="{Binding LinePrefix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1" />
    			<Label Content="Suffix" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label2" VerticalAlignment="Center" Grid.Row="2" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,0" x:Name="suffixTextBox" VerticalAlignment="Center" Text="{Binding LineSuffix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="2" />
    			<Label Content="Add Tab" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label3" VerticalAlignment="Center" Grid.Column="2" FontWeight="Bold" />
    			<Label Content="Remove Tab" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label4" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0" x:Name="addTabTextBox" VerticalAlignment="Center" Text="{Binding AddTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="3" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0" x:Name="removeTabTextBox" VerticalAlignment="Center" Text="{Binding RemoveTab, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="3" Grid.Row="1" />
    			<Label Content="Original Code" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label5" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3" FontWeight="Bold" />
    			<Label Content="Transformed Code" HorizontalAlignment="Stretch" Margin="4,0,0,0" x:Name="label6" VerticalAlignment="Center" Grid.Column="2" Grid.Row="3" FontWeight="Bold" />
    			<TextBox Grid.ColumnSpan="2" Grid.Row="4" HorizontalAlignment="Stretch" x:Name="originalCodeTextBox" VerticalAlignment="Stretch" Margin="8,0,4,8" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" AcceptsReturn="True" AcceptsTab="True" TextWrapping="NoWrap" Text="{Binding OriginalText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
    			<TextBox Grid.ColumnSpan="2" HorizontalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" Margin="4,0,8,8" x:Name="transformerCodeTextBox" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" Grid.Column="2" Grid.Row="4" IsReadOnlyCaretVisible="True" IsReadOnly="True" Text="{Binding ResultText, Mode=OneWay}" />
    			<Label Content="Empty Row" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label7" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,4,4,2" x:Name="emptyRowTextBox" Text="{Binding EmptyRow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Grid.Column="3" Grid.Row="2" />
    			<Label Content="Config Name" HorizontalAlignment="Stretch" Margin="8,0,0,0" x:Name="label1_Copy" VerticalAlignment="Center" FontWeight="Bold" />
    			<TextBox Height="23" HorizontalAlignment="Stretch" Margin="8,0,4,3.5" x:Name="prefixTextBox_Copy" VerticalAlignment="Bottom" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" />
    			<Grid Grid.ColumnSpan="4" Margin="0,0,-202,-96.04" Grid.RowSpan="5"/>
    		</Grid>
    	</DataTemplate>
    	<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
    		<StackPanel IsItemsHost="True"/>
    	</ItemsPanelTemplate>
    	<Style x:Key="TabItemStyle2" TargetType="{x:Type TabItem}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
    		<Setter Property="Foreground" Value="Black"/>
    		<Setter Property="Padding" Value="6,1,6,1"/>
    		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TabItem}">
    					<Grid SnapsToDevicePixels="true">
    						<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
    							<ContentPresenter x:Name="Content" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
    						</Border>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="true">
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemHotBackground}"/>
    						</Trigger>
    						<Trigger Property="IsSelected" Value="true">
    							<Setter Property="Panel.ZIndex" Value="1"/>
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemSelectedBackground}"/>
    						</Trigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="false"/>
    								<Condition Property="IsMouseOver" Value="true"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemHotBorderBrush}"/>
    						</MultiTrigger>
    						<Trigger Property="TabStripPlacement" Value="Bottom">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Left">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Right">
    							<Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
    						</Trigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Top"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-2,-2,-1"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,0,0,1"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Bottom"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-1,-2,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,1,0,0"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Left"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-2,-2,-1,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="0,0,1,0"/>
    						</MultiTrigger>
    						<MultiTrigger>
    							<MultiTrigger.Conditions>
    								<Condition Property="IsSelected" Value="true"/>
    								<Condition Property="TabStripPlacement" Value="Right"/>
    							</MultiTrigger.Conditions>
    							<Setter Property="Margin" Value="-1,-2,-2,-2"/>
    							<Setter Property="Margin" TargetName="Content" Value="1,0,0,0"/>
    						</MultiTrigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
    							<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="Padding" Value="4,4,4,4"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
    		<Setter Property="Background" Value="#F9F9F9"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TabControl}">
    					<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
    						<Grid.ColumnDefinitions>
    							<ColumnDefinition x:Name="ColumnDefinition0"/>
    							<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
    						</Grid.ColumnDefinitions>
    						<Grid.RowDefinitions>
    							<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
    							<RowDefinition x:Name="RowDefinition1" Height="*"/>
    						</Grid.RowDefinitions>
    						<TabPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="2,2,30,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
    						<Button Content="+" HorizontalAlignment="Right" Width="26" d:LayoutOverrides="Height" Margin="2,0" Command="{Binding AddConfigCommand, Mode=OneWay}"/>
    						<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
    							<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
    						</Border>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="TabStripPlacement" Value="Bottom">
    							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
    							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
    							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
    							<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
    							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Left">
    							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
    							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
    							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
    							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
    							<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
    							<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
    							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
    							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
    							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
    						</Trigger>
    						<Trigger Property="TabStripPlacement" Value="Right">
    							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
    							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
    							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
    							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
    							<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
    							<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
    							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
    							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
    							<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<DataTemplate x:Key="DataTemplate3">
    		<StackPanel Orientation="Horizontal">
    			<TextBlock TextWrapping="Wrap" Text="{Binding Name, Mode=OneWay}" VerticalAlignment="Center"/>
    			<Button Content="x" HorizontalAlignment="Stretch" Width="22" Margin="4,0,0,0" BorderThickness="0" Background="#00000000" BorderBrush="#00707070" Style="{DynamicResource DeleteButtonStyle1}" VerticalAlignment="Center" Padding="1,0,1,2" Command="{Binding RemoveConfigCommand, Mode=OneWay}"/>
    		</StackPanel>
    	</DataTemplate>
    	<Style x:Key="ButtonFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    	<Style x:Key="DeleteButtonStyle1" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderDefaulted="{TemplateBinding IsDefaulted}" SnapsToDevicePixels="true">
    						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    					</Microsoft_Windows_Themes:ButtonChrome>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true">
    							<Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true">
    							<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="#ADADAD"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    </Window.Resources>
    <Window.DataContext>
        <Binding Source="{StaticResource ViewModel}" />
    </Window.DataContext>
    <ScrollViewer x:Name="MainScroll" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">
    	<Grid>
    		<TabControl ItemsSource="{Binding Options, Mode=OneWay}" ContentTemplate="{DynamicResource DataTemplate2}" d:LayoutOverrides="Width, Height" Style="{DynamicResource TabControlStyle1}" ItemTemplate="{DynamicResource DataTemplate3}"/>
    	</Grid>
    </ScrollViewer>
</Window>
